package com.eian.boot.common.constants;

/**
 * 权限编码常量类
 * 统一管理系统中所有的权限编码，避免硬编码
 *
 * @author alex.meng
 */
public interface PermissionConstants {

    /**
     * 用户管理权限
     */
    interface User {
        String CREATE = "system:user:create";
        String QUERY = "system:user:query";
        String UPDATE = "system:user:update";
        String DELETE = "system:user:delete";
        String LIST = "system:user:list";
        String RESET_PWD = "system:user:resetPwd";
        String STATUS = "system:user:status";
        String ASSIGN_ROLE = "system:user:assignRole";
        String ASSIGN_DEPT = "system:user:assignDept";
        String ASSIGN_POST = "system:user:assignPost";
    }

    /**
     * 角色管理权限
     */
    interface Role {
        String CREATE = "system:role:create";
        String QUERY = "system:role:query";
        String UPDATE = "system:role:update";
        String DELETE = "system:role:delete";
        String LIST = "system:role:list";
        String ASSIGN_PERM = "system:role:assignPerm";
        String DATA_SCOPE = "system:role:dataScope";
    }

    /**
     * 权限管理权限
     */
    interface Permission {
        String CREATE = "system:permission:create";
        String QUERY = "system:permission:query";
        String UPDATE = "system:permission:update";
        String DELETE = "system:permission:delete";
        String LIST = "system:permission:list";
    }

    /**
     * 部门管理权限
     */
    interface Dept {
        String CREATE = "system:dept:create";
        String QUERY = "system:dept:query";
        String UPDATE = "system:dept:update";
        String DELETE = "system:dept:delete";
        String LIST = "system:dept:list";
    }

    /**
     * 岗位管理权限
     */
    interface Post {
        String CREATE = "system:post:create";
        String QUERY = "system:post:query";
        String UPDATE = "system:post:update";
        String DELETE = "system:post:delete";
        String LIST = "system:post:list";
        String STATUS = "system:post:status";
        String ASSIGN_USER = "system:post:assignUser";
    }

    /**
     * 操作日志权限
     */
    interface OperationLog {
        String LIST = "system:log:operation:list";
        String QUERY = "system:log:operation:query";
        String DELETE = "system:log:operation:delete";
    }

    /**
     * 登录日志权限
     */
    interface LoginLog {
        String LIST = "system:log:login:list";
        String QUERY = "system:log:login:query";
        String DELETE = "system:log:login:delete";
    }
}

